home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Imagine the Universe (9th Edition)
/
Imagine the Universe 9 - Disc 1.iso
/
pc
/
imagine
/
YBA
/
M31-velocity
/
javascript
/
spectra-quiz.js
< prev
next >
Wrap
Text File
|
2003-01-12
|
590b
|
29 lines
size1 = "Blank";
size2 = "Blank";
function testButton(form) {
for (Count = 0; Count < 5; Count++) {
if (form.answer1[Count].checked)
size1 = Count;
if (form.answer2[Count].checked)
size2 = Count;
}
RightAnswer1 = 1;
RightAnswer2 = 2;
NumberCorrect = 0;
AnswerPage = './spectra-quiz-answer.html';
if (size1 == RightAnswer1) {
NumberCorrect++;
}
if (size2 == RightAnswer2) {
NumberCorrect++;
}
alert ("You answered " +NumberCorrect + " out of 2 questions correctly!");
location = AnswerPage;
}